<div class="pagelist">
     <ul class="pagination">
         <li class="disabled"><span>总条数:{{data.total}}</span></li>
         <li class="disabled"><span>{{data.page}}/{{data.pages}}</span></li>
         {% if data.page==1 %}
            <li class="disabled"><span>«</span></li>
         {% else %}
            <li><a href="{{get_url(request.endpoint)}}?page={{ data.page-1 }}&{{keys|dict_to_query_string}}">«</a></li>
         {% endif %}

         {% for item in range(0,data.pages) %}
         <li {% if loop.index==data.page %}class="active"{% endif %}><a href="{{get_url(request.endpoint)}}?page={{ loop.index }}&{{keys|dict_to_query_string}}">{{ loop.index }}</a></li>
         {% endfor %}

         {% if data.page==data.pages %}
            <li class="disabled"><span>»</span></li>
         {% else %}
            <li><a href="{{get_url(request.endpoint)}}?page={{ data.pages-1 }}&{{keys|dict_to_query_string}}">«</a></li>
         {% endif %}
     </ul>
</div>